<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1,user-scalable=no,height=device-height" />
    <meta name="format-detection" content="telephone=yes" />
    <!-- <meta name="viewport" content="width=375, user-scalable=no" /> -->
    <!-- <meta
      name="viewport"
      content="initial-scale=1.0, maximum-scale=1, user-scalable=no,width=device-width,height=device-height"
    /> -->
    <mate name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"/>
    <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
    <title><%= htmlWebpackPlugin.options.title %></title>
    <!-- 获取地理位置 -->
    <!-- <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=4d46a981fb5512cffeaf24218d5a708f"></script>  -->
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=7a6QKaIilZftIMmKGAFLG7QT1GLfIncg"></script>
    <!-- <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> -->
    <!-- <script src="../libs/jquery.js"></script>
    <script src="../libs/jquery.min.js"></script> -->
  </head>
  <body>
    <script type="text/javascript">
      // document.documentElement.style.height = window.innerHeight + "px";
      document.addEventListener("plusready", function() {
        var webview = plus.webview.currentWebview();
        plus.key.addEventListener("backbutton", function() {
          webview.canBack(function(e) {
            if (e.canBack) {
              webview.back();
            } else {
              //webview.close(); //hide,quit
              //plus.runtime.quit();
              //首页返回键处理
              //处理逻辑：1秒内，连续两次按返回键，则退出应用；
              var first = null;
              plus.key.addEventListener(
                "backbutton",
                function() {
                  //首次按键，提示‘再按一次退出应用’
                  if (!first) {
                    first = new Date().getTime();
                    console.log("再按一次退出应用");
                    setTimeout(function() {
                      first = null;
                    }, 1000);
                  } else {
                    if (new Date().getTime() - first < 1500) {
                      plus.runtime.quit();
                    }
                  }
                },
                false
              );
            }
          });
        });
      });
    </script>
    <noscript>
      <strong
        >We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
        properly without JavaScript enabled. Please enable it to
        continue.</strong
      >
    </noscript>
    <div id="app"></div>
  </body>
</html>
